package com.james;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;

import java.io.IOException;

//主配置类，主程序类
@SpringBootApplication
@EnableWebSecurity(debug = true)
public class SpringbootFrameApplication {

    public static void main(String[] args) throws IOException {
        //1、返回我们IOC容器
        ConfigurableApplicationContext context = SpringApplication.run(SpringbootFrameApplication.class, args);

//        //2、查看容器里面的组件
//        String[] beanDefinitionNames = context.getBeanDefinitionNames();
//        for (String beanDefinitionName : beanDefinitionNames) {
//            System.out.println(beanDefinitionName);
//        }

//        System.out.println("============");
//        String[] beanNamesForType = context.getBeanNamesForType(Pet.class);
//        for (String s : beanNamesForType) {
//            System.out.println(s);
//        }
//
//        System.out.println("=========");
//        String[] beanNamesForType1 = context.getBeanNamesForType(User.class);
//        for (String s : beanNamesForType1) {
//            System.out.println(s);
//        }

//        System.out.println("======");


    }

}
